package com.rgs.platform.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum BillTypeEnum {

    /**
     * 账单类型
     */
    MARRY(1,"结婚"),
    HAS_CHILDREN(2,"生子"),
    OTHER(3,"其他"),

    UNKNOW(404,"未知");

    private Integer code;
    private String msg;

    public static BillTypeEnum getByCode(Integer code){
        for(BillTypeEnum item:values()){
            if(item.getCode().equals(code)){
                return item;
            }
        }
        return UNKNOW;
    }
}
